Product Reviews

Save Admin Time with Scripting

If you had a wish list for the WSH, it might look like XLNT 2.0.

Power to the people! For years we’ve been complaining that NT lacks the in-depth manageability that Unix and friends have offered from day one. Microsoft heard our cries and now offers a powerful and extensible scripting host: the Windows Script Host (WSH). This little marvel of technology allows you to plug in scripting engines so that you can script with a language that you know, rather than having to go through the pains of learning VBScript or JScript (insert ironic laughter here).

It was only a matter of time until the third-party market started producing competing engines and hosts promising better integration, easier interfaces, and more powerful command processors. One such product is Advanced Systems Concepts’ XLNT 2.0. However, this product is more than just a simple plug-in scripting engine.

XLNT, which the company no doubt hopes you’ll pronounce “excellent,” actually consists of two distinct products: The XLNT scripting language/development environment and the Batch Queue Management System (BQMS), which essentially schedules and executes your scripts, albeit with enhanced functionality of its own. Let’s look at XLNT first.

A Script A Day Keeps Dr. Watson Away
Think of the WSH as a container, just like IIS and even IE. All three of these containers can “house” a script, as long as it’s written in a language for which they have an “engine” capable of decoding it. In its simplest form, XLNT is a scripting engine that can be installed, registered, and used for writing scripts to run under the WSH. Even if this were the extent of its abilities, there would be compelling arguments for learning its scripting language and using it instead of VBScript or JScript, most notably: more power! A couple of examples would be:

  • Enhanced data types—VBScript treats everything as the datatype VARIANT. XLNT allows for Integers, Words, Dwords, Strings, and even user-defined structures (basically a collection of any and/or all of the above into one variable), to name just a few.

  • Powerful built-in commands—In my exclusively online October article, “Supercharge Your Scripts,” I spoke about the limitations in VBScript and JScript and how you can use components to add power. XLNT has much of this power right out of the box. NT user and group management, extensive system information, and file permissions are but a few areas where XLNT can perform miracles with just a single command!

Finally, XLNT scripts can be compiled into .EXE files. Not only does this simplify execution, but it keeps your source code secure, so that others can’t see what the script is doing and change it.

If you’re reluctant to tackle a new scripting language, you’ll be happy to know that a multitude of sample scripts are included. In fact, I highly recommend that you review them (even if you think you already know everything. HTML humor: <joke>Like me! I know everything… I just can’t remember it all at once!!</joke>) Many of these samples really showcase the power of XLNT such as NTACC.XCP, WINNTRPC.XCP, and ADMIN.XCP.

Manage This!
The BQMS provides quite a robust way of scheduling your scripts. It can be used in conjunction with XLNT or on its own to schedule and run scripts (or anything else, for that matter). The figure below shows the Queue Manager GUI. Once you set up your queue, you can start submitting jobs to it. BQMS gives you quite a bit of flexibility in scheduling jobs. This is particularly sublime for recurring jobs—months, weekdays, and days of the month can be specified along with the start time. And since, as I’ve said, you can use it for all of your scheduled tasks, I don’t see much use for the NT Scheduler Service in your future.

XLNT Queue Manager
The XLNT Queue Manager shows all jobs scheduled.

Even without BQMS, XLNT provides the ability to boost your scripting capabilities. Put the two together and you have quite an administrative weapon. Using it takes a little getting used to. Some of its commands and operators may seem foreign at first; but invest some time to learn it and the end result will be better productivity.

About the Author

Chris Brooke, MCSE, is a contributing editor for Redmond magazine and director of enterprise technology for ComponentSource. He specializes in development, integration services and network/Internet administration. Send questions or your favorite scripts to [email protected].

comments powered by Disqus
Most   Popular

Upcoming Training Events